﻿CREATE TRIGGER tr_Loan_Verification_Checked
ON dbo.t_Loan_Verification 
FOR UPDATE
AS

IF @@ROWCOUNT = 0 RETURN
IF NOT UPDATE(Checked) RETURN

IF EXISTS(SELECT * FROM ts_Verification_SmartItems vsi INNER JOIN inserted i ON vsi.VerificationID = i.VerificationID)BEGIN
	DECLARE @S_VerSmart int EXEC @S_VerSmart = sp__Session_CancelBubble 'VerSmart'
	IF @S_VerSmart <> 1 BEGIN
		ROLLBACK TRAN
		RAISERROR('This is Smart Item.',16,1)
		RETURN
	END
END
